<?php
require_once('././classes/Student.php');
$student = new Student;
?>
<div id="content">
<table border=1>
    <tr>
        <th>ID Number</th>
        <th>Last Name</th>
        <th>First Name</th>
        <th>Gender</th>
    </tr>
    
    <?php
    $ctr=1;
    $stud_rec = $student -> getStudent();
    for($x=0; $x<count($stud_rec); $x++) {
        echo "<tr>";
        //echo "<td>".$ctr."</td>";
        echo "<td>".$stud_rec[$x]['stud_id']."</td>";
        echo "<td>".$stud_rec[$x]['fname']."</td>";
        echo "<td>".$stud_rec[$x]['lname']."</td>";
        echo "<td>".$stud_rec[$x]['gender']."</td>";
        //echo '<td><a href="UpdateStudentForm.php?id='.$student_rec[$x]['id'].'&fname='.$student_rec[$x]['fname'].'&lname='.$student_rec[$x]['lname'].'&midini='.$student_rec[$x]['midini'].'&gend='.$student_rec[$x]['gend'].'">Update</a> | <a href="DeleteStudent.php?id='.$student_rec[$x]['id'].'">Delete</a></td>';
        echo "</tr>";
        $ctr+=1;
    }
    ?>
</table>
</div>

